//
//  NSDetailBannerCell.m
//  PassionPulse
//
//  Created by kyo on 2023/12/6.
//

#import "NSDetailBannerCell.h"

@interface NSDetailBannerCell()

@end

@implementation NSDetailBannerCell
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

#pragma mark - Public Metohd

#pragma mark - Action

#pragma mark - UI
- (void)setupUI {
//    self.layer.cornerRadius = MBHeightScale(10);
//    self.layer.masksToBounds = YES;

    
    [self.contentView addSubview:self.iconImageView];
    [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
    
    
//    UIBezierPath *maskPath;
//    maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, ScreenWidth, ScreenWidth*419/375) byRoundingCorners:(UIRectCornerBottomLeft | UIRectCornerBottomRight) cornerRadii:CGSizeMake(MBHeightScale(18),MBHeightScale(18))];//圆角大小
//    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
//    maskLayer.frame = CGRectMake(0, 0, ScreenWidth, ScreenWidth*419/375);
//    maskLayer.path = maskPath.CGPath;
//    self.contentView.layer.mask = maskLayer;
    
}

#pragma mark - Setter && Getter
- (UIImageView *)iconImageView {
    if (!_iconImageView) {
        _iconImageView = [UIImageView new];
        _iconImageView.contentMode = UIViewContentModeScaleAspectFill;
//        _iconImageView.layer.cornerRadius = MBHeightScale(18);
//        _iconImageView.layer.masksToBounds = YES;
    }
    return _iconImageView;
}
@end
